#coding:utf-8
from flask import Flask,session
from flask_sqlalchemy import SQLAlchemy
from werkzeug.security import generate_password_hash,check_password_hash

app=Flask(__name__)

app.secret_key='\x9d\x07\xca\xe9vo\xbf\x8f\xb6\xa8\xa1\xb5\x9b\xc9hB\x8a\xc7\xda\xeb'
app.config['PERMANENT_SESSION_LIFETIME']=60*600

app.debug=True
db=SQLAlchemy(app)

def creat_app():
    app.config['SQLALCHEMY_DATABASE_URI']='mysql://root:123@127.0.0.1:3306/post'

    from .main import main
    app.register_blueprint(main)
    from .pay import pay
    app.register_blueprint(pay)

    return app

from . import model 
